 //
//  KLSGTracksListCell.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/10/30.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGTracksListCell.h"

@implementation KLSGTracksListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{
    self.titleLale = [[UILabel alloc] initWithFrame:CGRectMake(15, 0, kScreenWidth /1.5, 50)];
//    self.titleLale.backgroundColor = [UIColor yellowColor];
    self.titleLale.font = [UIFont systemFontOfSize:16];
    self.titleLale.numberOfLines = 0;
    [self.contentView addSubview:self.titleLale];
    
    UIImageView *playTimesImage = [[UIImageView alloc] initWithFrame:CGRectMake(15, CGRectGetMaxY(self.titleLale.frame) + 7, 10, 10)];
    playTimesImage.image = [UIImage imageNamed:@"live_play_num"];
    [self.contentView addSubview:playTimesImage];
    
    self.playTimesLale = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(playTimesImage.frame) + 5, CGRectGetMaxY(self.titleLale.frame), 60, 30)];
//    self.playTimesLale.backgroundColor = [UIColor greenColor];
    self.playTimesLale.font = [UIFont systemFontOfSize:13];
    self.playTimesLale.alpha = kAlpha;
    [self.contentView addSubview:self.playTimesLale];
    
    UIImageView *timeImage = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.playTimesLale.frame) + 10, CGRectGetMaxY(self.titleLale.frame) + 7, 15, 15)];
    timeImage.image = [UIImage imageNamed:@"search_history"];
    [self.contentView addSubview:timeImage];
    
    self.timeLale = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(timeImage.frame) + 5, CGRectGetMaxY(self.titleLale.frame), 60, 30)];
//    self.timeLale.backgroundColor = [UIColor redColor];
    self.timeLale.font = [UIFont systemFontOfSize:13];
    self.timeLale.alpha = kAlpha;
    [self.contentView addSubview:self.timeLale];
    
    self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
  
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(15, 79, kScreenWidth - 15, 1)];
    lineView.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:lineView];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
